﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColorSetter : MonoBehaviour
{
    public MeshRenderer[] meshRenderer;
    public Color color;
    public int materialIndex;

    public void SetColor()
    {
        foreach (var item in meshRenderer)
        {
            item.materials[materialIndex].color = color;
        }
    }
}
